package com.ruoyi.depot.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 装箱清单导入记录表
 * @TableName walmart_stock_plan_packing_detail
 */
@TableName(value ="walmart_stock_plan_packing_detail")
@Data
public class WalmartStockPlanPackingDetail implements Serializable {
    /**
     * 
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 备货计划ID
     */
    @TableField(value = "stock_id")
    private String stockId;

    /**
     * 销售计划明细ID
     */
    @TableField(value = "shipments_product_id")
    private String shipmentsProductId;

    /**
     * SKU
     */
    @TableField(value = "sku")
    private String sku;

    /**
     * GTIN
     */
    @TableField(value = "gtin")
    private String gtin;

    /**
     * 箱序号
     */
    @TableField(value = "box_number")
    private String boxNumber;

    /**
     * 分配数量
     */
    @TableField(value = "allocated_quantity")
    private Integer allocatedQuantity;

    /**
     * 分配运费
     */
    @TableField(value = "allocated_freight")
    private BigDecimal allocatedFreight;

    /**
     * 创建时间
     */
    @TableField(value = "created_time")
    private Date createdTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WalmartStockPlanPackingDetail other = (WalmartStockPlanPackingDetail) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getStockId() == null ? other.getStockId() == null : this.getStockId().equals(other.getStockId()))
            && (this.getShipmentsProductId() == null ? other.getShipmentsProductId() == null : this.getShipmentsProductId().equals(other.getShipmentsProductId()))
            && (this.getSku() == null ? other.getSku() == null : this.getSku().equals(other.getSku()))
            && (this.getBoxNumber() == null ? other.getBoxNumber() == null : this.getBoxNumber().equals(other.getBoxNumber()))
            && (this.getAllocatedQuantity() == null ? other.getAllocatedQuantity() == null : this.getAllocatedQuantity().equals(other.getAllocatedQuantity()))
            && (this.getAllocatedFreight() == null ? other.getAllocatedFreight() == null : this.getAllocatedFreight().equals(other.getAllocatedFreight()))
            && (this.getCreatedTime() == null ? other.getCreatedTime() == null : this.getCreatedTime().equals(other.getCreatedTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getStockId() == null) ? 0 : getStockId().hashCode());
        result = prime * result + ((getShipmentsProductId() == null) ? 0 : getShipmentsProductId().hashCode());
        result = prime * result + ((getSku() == null) ? 0 : getSku().hashCode());
        result = prime * result + ((getBoxNumber() == null) ? 0 : getBoxNumber().hashCode());
        result = prime * result + ((getAllocatedQuantity() == null) ? 0 : getAllocatedQuantity().hashCode());
        result = prime * result + ((getAllocatedFreight() == null) ? 0 : getAllocatedFreight().hashCode());
        result = prime * result + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", stockId=").append(stockId);
        sb.append(", shipmentsProductId=").append(shipmentsProductId);
        sb.append(", sku=").append(sku);
        sb.append(", boxNumber=").append(boxNumber);
        sb.append(", allocatedQuantity=").append(allocatedQuantity);
        sb.append(", allocatedFreight=").append(allocatedFreight);
        sb.append(", createdTime=").append(createdTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}